<?php

/**
 * второй класс моделей
 */
require_once "core/application/models/activatepremium/mactivatepremium1.php";

class Mactivatepremium2 extends Mactivatepremium1 {

    private $_query = NULL;

    public function setAccountPremium($login, $membership, $expire) {
        /**
         * присвоение аккаунту статуса премиум
         * @param string $login
         * @param int $membershop
         * @param date $expire
         */
        DB::getInstance()->openConnectionToLS();
        $this->_query = "UPDATE `account_data` SET `membership` = '$membership', `expire` = '$expire' WHERE `name` = '$login' ";
        return DB::getInstance()->sql($this->_query);
        DB::getInstance()->closeConnection();
        unset($this->_query);
    }

}

?>
